<template>
  	<el-row >
	  	 <!--<el-col :xs="1" :md="1">-->
	  		 <!--<img src="../../assets/logo1.png" class="mt10 pointer" width="32" height="32"-->
	  		<!--@click="logo"-->
	  		<!--&gt;-->
	  	 <!--</el-col>-->

	  	<el-col :xs="18" :md="6">
			<div class="fl mr5" ><img src="../../assets/logo1.png" class="mt10 pointer" width="32" height="32"/></div>
	  		<div class="mt15 h2 pointer" @click="logo" >网格员综合管理系统</div>
	  	</el-col>

	  	<el-col class="hidden-xs-only" :md="6">
&nbsp;
	  	</el-col>

	  	<el-col :xs="3" :md="12" >

	  		<el-form :inline="true" class="mt10 text-right" >
	  		
				<el-form-item :label="userInfo.roleName">
					{{userInfo.name}}
				</el-form-item>
				<el-form-item>
					<div class=" pointer layout" style="color:#4BACC6;" @click="logout">
						<i class="iconfont gridtuichu"></i>
						注销
					</div>
				</el-form-item>
			</el-form>

			<!-- <div class="mt20 pointer red"
	  		@click="logout"
	  		><i class="el-icon-error"></i></div> -->
	  	</el-col>

	  	<!-- <el-col :span="1" class="text-right">
	  		<div class="mt20 pointer red"
	  		@click="logout"
	  		><i class="el-icon-error"></i></div>
	  	</el-col> -->

	</el-row>

</template>

<script>

import { mapGetters } from 'vuex'
// import { logout } from '../../service/api'
//import http from '@/common/http'


export default {
	name: 'header1',
		data () {
		return {
		}
	},

	components: {
		
	},

	computed : {
		...mapGetters([
			'userInfo',
	  //       'systemList', 
	  //       'systemName',
	    ]),
	},

	methods : {

	    logout () {

			const para = {
				fun : 'logout',
				cb : res => {
					this.$router.push({ 
						name: 'login', 
					});
				}
			};
			this.$http(para);
		},

		logo () {
			this.$router.push({ 
				name: 'dashboard', 
			});
		}
	},

	watch:{
	    
	},

	mounted () {
		
	},

}
</script>

<style scoped>
.layout{
	color: #1776e1;
}
</style>
